package com.examen.presentacion.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class RegistroPersonaController {
private static final String PAGINA_REGISTRO_PERSONA="registroPersona";
private static final String PAGINA_REGISTRAR_PERSONA="menssageOK";

	
	@RequestMapping(value = "/cargarRegistroPersona.do")	
	public String cargarRegistroPersona(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		System.out.println("Dentro de cargarRegistroPersona.do ...");
		//return new ModelAndView("inicio");
		return PAGINA_REGISTRO_PERSONA;
	}
	
	@RequestMapping(value = "/registarPersona.do")	
	public String registarPersona(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		System.out.println("Dentro de registarPersona ...");
		String nombrePersona=request.getParameter("txtNombre");
		System.out.println("nombrePersona --> "+nombrePersona);
		
		return PAGINA_REGISTRAR_PERSONA;
	}
}
